<template>
  <view class="page page-image p-h30">
    <up-navbar
      placeholder
      bgColor="transparent">
      <template #left>
        <view />
      </template>
      <template #center>
        <view class="text-700-132">找工作</view>
      </template>
    </up-navbar>

    <SearchView />
    <FilterView />
    <OfficeView :list="positionList" />
  </view>
</template>

<script lang="ts" setup>
  import SearchView from './components/search.vue'
  import FilterView from './components/filter.vue'
  import OfficeView from './components/office.vue'
  import { ref } from 'vue'
  import { onLoad } from '@dcloudio/uni-app'

  const positionList = ref([])

  const getPositionList = () => {
    uni.$u.get('/position/lst', { page: 1, limit: 10 }).then((res) => {
      if (res.code === 1) {
        positionList.value = res.data.data
      }
    })
  }

  onLoad((e) => {
    getPositionList()
  })
</script>

<style lang="scss" scoped>
	.page {
		background-color: $page-color-1;
	}
</style>
